﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DiaryPlanner
{
    public partial class MainForm : Form
    {
        Diary_main DiaryPage ;//수정
        Planner PlannerPage=new Planner();
        Memo MemoPage=new Memo();
        Account AccountPage=new Account();
        Album AlbumPage;
        Config ConfigPage;

        Boolean logInOK = false;

        public MainForm()
        {
            InitializeComponent();
            //수정

            AlbumPage = new Album();
            ConfigPage = new Config(AlbumPage);

            DiaryPage = new Diary_main(this);
            this.mainPagePanel.Controls.Clear();
            this.mainPagePanel.Controls.Add(DiaryPage);
            DiaryPage.skinSet();
        }

        private void DiaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.mainPagePanel.Controls.Clear();
            this.mainPagePanel.Controls.Add(DiaryPage);
            DiaryPage.skinSet();
            
        }

        private void PlannerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.mainPagePanel.Controls.Clear();
            this.mainPagePanel.Controls.Add(PlannerPage);
            PlannerPage.skinSet();
        }

        private void MemoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.mainPagePanel.Controls.Clear();
            this.mainPagePanel.Controls.Add(MemoPage);
            MemoPage.skinSet();
        }

        private void AccountToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.mainPagePanel.Controls.Clear();
            this.mainPagePanel.Controls.Add(AccountPage);
            AccountPage.skinSet();

        }

        private void AlbumToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.mainPagePanel.Controls.Clear();
            this.mainPagePanel.Controls.Add(AlbumPage);
            AlbumPage.skinSet();

        }

        private void ConfigToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.mainPagePanel.Controls.Clear();
            this.mainPagePanel.Controls.Add(ConfigPage);
            ConfigPage.skinSet();
        }

        /// <summary>
        /// diary에서 window의 크기를 조절하는 함수
        /// </summary>
        public void panel_size()
        {
            
            this.ClientSize = new System.Drawing.Size(736, 653);
            this.mainPagePanel.Size = new System.Drawing.Size(731, 628);
        }
        public void return_panel_size()
        {
            this.ClientSize = new System.Drawing.Size(736, 453);
            this.mainPagePanel.Size = new System.Drawing.Size(731, 428);
        }
    }
}
